package com.scsj.supermarket.adapter.homeadapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.scsj.supermarket.R;
import com.scsj.supermarket.bean.MineBean;

import java.util.List;

/**
 * 首页功能键布局adapter
 */

public class HomeFuncAdapter extends BaseQuickAdapter<MineBean, BaseViewHolder> {

    public HomeFuncAdapter(List data) {
        super(R.layout.item_home_func_layout, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, MineBean item) {
        Glide.with(mContext).load(item.getImageview()).into((ImageView) helper.getView(R.id.home_func_iv));
        helper.setText(R.id.home_func_tv, item.getName());
    }
}
